package com.tianzeculture.stagebao.activity.artist.fragment;

import android.app.Activity;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ListView;

import com.tianzeculture.stagebao.R;
import com.tianzeculture.stagebao.activity.artist.ArtistActivity;
import com.tianzeculture.stagebao.activity.artist.adapter.PhotoAdapter;
import com.tianzeculture.stagebao.base.BaseFragment;
import com.tianzeculture.stagebao.bean.ArtistsDetailedBean;
import com.tianzeculture.stagebao.bean.PersonnelPoolBean;
import com.tianzeculture.stagebao.bean.PhotoListEvent;
import com.tianzeculture.stagebao.bean.WorkTag;
import com.tianzeculture.stagebao.net.UserRestUsage;
import com.tianzeculture.stagebao.network.Request;
import com.tianzeculture.stagebao.network.enity.MSG;
import com.tianzeculture.stagebao.network.util.ToastUtil;
import com.tianzeculture.stagebao.util.Util;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/6/7 0007.
 * 艺人详情页-照片
 */

public class ArtistPhotoFragment extends BaseFragment {

    @BindView(R.id.rvArtist)
    RecyclerView rvArtist;

    PhotoAdapter photoAdapter = null;
    ArtistsDetailedBean bean;


    @Override
    public void onAttach(Activity context) {
        super.onAttach(context);
        bean = ((ArtistActivity) context).getData();
    }

    @Override
    public void initUI() {
        super.initUI();

        LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        rvArtist.setLayoutManager(layoutManager);
        rvArtist.setHasFixedSize(true);
        photoAdapter = new PhotoAdapter(getActivity(), bean.getListp());
        rvArtist.setAdapter(photoAdapter);
    }


    @Override
    protected int getLayoutResID() {
        return R.layout.fragment_artist_home;
    }





}
